<template >
  <!-- 顶部通栏 -->
  <AppTopnav />
  <!-- 吸顶头部组件 -->
  <AppHeaderSticky/>
  <!-- 头部组件 -->
  <AppHeader />
  <!-- 内容容器 -->
  <div class="app-body">
    <!-- 二级路由 -->
    <router-view></router-view>
  </div>
  <!-- 底部组件 -->
  <AppFooter />
</template>
<script>
import AppTopnav from "@/components/app-nav";
import AppHeader from "@/components/app-header";
import AppFooter from "@/components/app-footer";
import AppHeaderSticky from '@/components/app-header-sticky.vue'
import { useStore } from "vuex";

export default {
  name: "Layout",
  components: { AppTopnav,AppHeaderSticky, AppHeader, AppFooter },
  // 获取分类数据
  setup() {
    const store = useStore();
    store.dispatch("category/getList");
    return {};
  },
};
</script>
<style lang="less" scoped>

</style>